package com.groupscore.score.dao;

import com.groupscore.score.pojo.GroupTeam;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import java.util.Map;

public interface TeamDao extends JpaRepository<GroupTeam,String>, JpaSpecificationExecutor<GroupTeam> {

    @Query(value = "select id,name from group_team order by rand() limit 4",nativeQuery = true)
    public List<Map> findSearchTeam();
}
